<!DOCTYPE html>
<html lang="en">
 
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    .table {
      border: 1px solid #eee;
      text-align: center;
    }
     
    .table td,
    .table th {
      border: 1px solid #eee;
      text-align: center;
    }
  </style>
</head>
 
<body>
  <br />
  <br />
  <a href="/add">增加用户</a>
  <br />
  <br />
  <table class="table">
    <tr>
      <th>姓名</th>
      <th>年龄</th>
      <th>性别</th>
      <th>操作</th>
    </tr>
    {{each list}}
    <tr>
      <td>{{$value.username}}</td>
      <td>{{$value.age}}</td>
      <td>{{$value.sex}}</td>
      <td>
        <a href="/edit?id={{@$value._id}}">编辑</a> <a href="/delete?id={{@$value._id}}">删除</a>
      </td>
    </tr>
    {{/each}}
  </table>
</body>
 
</html>